<template>
  <div>
    <van-tabbar v-model="active" route @change="onChange">
      <van-tabbar-item icon="shop-o" replace to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="apps-o" replace to="/apps">分类</van-tabbar-item>
      <van-tabbar-item icon="cart-o" replace :dot="dot" to="/shop">购物车</van-tabbar-item>
      <van-tabbar-item icon="user-circle-o" replace to="/me">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
    props:['dot'],
    data() {
        return {
            active:0,
        }
    },
    methods: {
        onChange(_val) {
            console.log(_val);
        }
    },
};
</script>

<style lang="scss" scoped>
</style>